package com.hiultra.archive.service.impl;

import java.util.List;
import java.util.UUID;

import com.hiultra.archive.domain.vo.SelectParamsVo;
import com.hiultra.archive.mapper.ArchiveArchAreaMapper;
import com.hiultra.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.hiultra.archive.mapper.ArchiveCabinetMapper;
import com.hiultra.archive.domain.ArchiveCabinet;
import com.hiultra.archive.service.IArchiveCabinetService;

/**
 * 柜Service业务层处理
 *
 * @author paidaxing
 * @date 2024-07-25
 */
@Service
public class ArchiveCabinetServiceImpl implements IArchiveCabinetService
{
    @Value("${roomNo}")
    private String roomNo;
    @Autowired
    private ArchiveArchAreaMapper archiveArchAreaMapper;
    @Autowired
    private ArchiveCabinetMapper archiveCabinetMapper;

    /**
     * 查询柜
     *
     * @param id 柜主键
     * @return 柜
     */
    @Override
    public ArchiveCabinet selectArchiveCabinetById(String id)
    {

        return archiveCabinetMapper.selectArchiveCabinetById(id);
    }

    /**
     * 查询柜列表
     *
     * @param archiveCabinet 柜
     * @return 柜
     */
    @Override
    public List<ArchiveCabinet> selectArchiveCabinetList(ArchiveCabinet archiveCabinet)
    {
        return archiveCabinetMapper.selectArchiveCabinetList(archiveCabinet);
    }

    /**
     * 新增柜
     *
     * @param archiveCabinet 柜
     * @return 结果
     */
    @Override
    public int insertArchiveCabinet(ArchiveCabinet archiveCabinet)
    {
        archiveCabinet.setCreateTime(DateUtils.getNowDate());
        return archiveCabinetMapper.insertArchiveCabinet(archiveCabinet);
    }

    /**
     * 修改柜
     *
     * @param archiveCabinet 柜
     * @return 结果
     */
    @Override
    public int updateArchiveCabinet(ArchiveCabinet archiveCabinet)
    {
        return archiveCabinetMapper.updateArchiveCabinet(archiveCabinet);
    }

    /**
     * 批量删除柜
     *
     * @param ids 需要删除的柜主键
     * @return 结果
     */
    @Override
    public int deleteArchiveCabinetByIds(String[] ids)
    {
        return archiveCabinetMapper.deleteArchiveCabinetByIds(ids);
    }

    /**
     * 删除柜信息
     *
     * @param id 柜主键
     * @return 结果
     */
    @Override
    public int deleteArchiveCabinetById(String id)
    {
        return archiveCabinetMapper.deleteArchiveCabinetById(id);
    }
}
